package it.uniroma2.sd.db;

public class Column implements IColumn
{
    /**
     * 
     */
    private static final long serialVersionUID = -1866804323250936302L;
    private String name;
    private long timestamp;
    private Object value;

    // TODO chi decide il timestamp???
    public Column(String name, Object value)
    {
	this.name = name;
	this.timestamp = System.currentTimeMillis(); // FIXME use current system time?
	this.value = value;
    }

    @Override
    public String getName()
    {
	return this.name;
    }

    @Override
    public Object getValue()
    {
	return this.value;
    }

    @Override
    public String toString()
    {
	return this.name + ": " + this.value + ", #" + String.valueOf(this.timestamp);
    }
}
